<div class="container" style="margin-top:100px;">
    <div class="row-fluid">
        <div class="span4">&nbsp;</div>
        <div class="span5">
            <?php
            /** @var BootActiveForm $form */
            $form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array(
                        'id' => 'sysLoginForm',
                        'type' => 'horizontal',
                        'htmlOptions' => array('class' => 'well well-large'),
                        'enableClientValidation' => true,
                        'clientOptions' => array(
                            'validateOnSubmit' => true,
                        ),
                    ));
            ?>
            <h1>SysAdmin Login</h1>
            <hr />
            <?php
            echo $form->textFieldRow($sysLoginForm, 'username', array('class' => 'span11'));
            echo $form->passwordFieldRow($sysLoginForm, 'password', array('class' => 'span11'));
            echo $form->checkboxRow($sysLoginForm, 'rememberMe');
            echo '<hr />';
            echo '<div class="span5"></div>'; 
            $this->widget('bootstrap.widgets.TbButton', array('buttonType' => 'submit', 'icon' => 'ok', 'label' => 'Login','loadingText'=>'Loging.....','htmlOptions'=>array('id'=>'buttonStateful')));
            $this->endWidget();
            ?>
        </div>
        <div class="span4">&nbsp;</div>
    </div>

</div>
<script>
    $('#buttonStateful').click(function() {
    var btn = $(this);
    btn.button('loading'); // call the loading function
    setTimeout(function() {
        btn.button('reset'); // call the reset function
    }, 2000);
    $('#sysLoginForm').submit();
});
</script>